#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "cardtests.h"


int test_card4() {
    int player1 = 0;
    struct gameState state;
    memset(&state, 0, sizeof(struct gameState)); // clear the game state
    int kingdom_cards[10] = {adventurer, council_room, feast, gardens, mine,
        remodel, smithy, village, baron, great_hall};

    initializeGame(2, kingdom_cards, 1, &state); // initialize a new game

    printf("Testing Outpost card effect\n");

    int card = outpost;
    int prevHandCount = state.handCount[player1];
    int handPos = 0;
    int discardedCard = state.hand[player1][handPos];

    assert(cardEffect(card, 0, 0, 0, &state, handPos, 0) == 0);
    assert(state.outpostPlayed == 1);
    assert(state.handCount[player1] == prevHandCount-1);
    assert(state.playedCardCount == 1);
    assert(state.playedCards[0] == discardedCard);

    printf("Outpost card effect passed\n");
    printf("\n");

    return 0;
}
